<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:88:"/data/www/html/web2017/public_html/../application/index/view/usercenter/mypartessay.html";i:1497950034;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>已投征文</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <!--<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">-->
    <link rel="stylesheet" href="__STATIC__/style/weui.min.css">
    <link rel="stylesheet" href="__STATIC__/style/cmgd.css">
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <!--奥森图标-->
    <link rel="stylesheet" href="__STATIC__/style/FontAwesome_4.2.0/css/font-awesome.min.css">
    <style>
        .text{padding-left:9px; }
        .nt1{padding:0px 6px 0 6px; background:#2fab87;color:#fff;}
        .weui-media-box__desc{line-height: 1.4;}
    </style>
</head>
<body>

<div class="container" id="container">

    <!--顶部搜索-->
    <div class="page home js_show">

        <div class="page__bd" style="height: 100%;">
            <!--选择导航-->



            <div class="weui-tab__panel">

                <div class="weui-panel articlelist">


                    <div class="page__bd">
                        <div class="weui-panel weui-panel_access">
                            <div class="weui-panel__hd" style="font-size:16px;color:#000;text-align:center;height:32px;"><b>我参与的征文</b></div>
                            <div class="weui-panel__bd">
                                <div id="myarticle"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
<!--<div class="weui-tabbar footer" >-->
    <!--<a href="javascript:;" class="weui-tabbar__item weui-bar__item_on">-->
                    <!--<span style="display: inline-block;position: relative;">-->
                        <!--<i class="fa fa-home weui-tabbar__icon"></i>-->
                    <!--</span>-->
        <!--<p class="weui-tabbar__label">首页</p>-->
    <!--</a>-->
    <!--<a href="javascript:;" class="weui-tabbar__item">-->
                    <!--<span style="display: inline-block;position: relative;">-->
                        <!--<i class="fa fa-comments weui-tabbar__icon"></i>-->
                        <!--<span class="weui-badge weui-badge_dot" style="position: absolute;top: 0;right: -6px;"></span>-->
                    <!--</span>-->
        <!--<p class="weui-tabbar__label">动态</p>-->
    <!--</a>-->
    <!--<a href="<?php echo url('usercenter/index'); ?>" class="weui-tabbar__item">-->
                    <!--<span style="display: inline-block;position: relative;">-->
                        <!--<i class="fa fa-user weui-tabbar__icon"></i>-->
                            <!--<span class="weui-badge" style="position: absolute;top: -2px;right: -6px;">8</span>-->
                    <!--</span>-->
        <!--<p class="weui-tabbar__label">我的</p>-->

    <!--</a>-->
<!--</div>-->
</div>
</body>

<script type="text/javascript">
    now =1 ;
    AjaxPage();

    $(window).scroll(
            function() {
                var scrollTop = $(this).scrollTop();
                var scrollHeight = $(document).height();
                var windowHeight = $(this).height();
                if (scrollTop + windowHeight == scrollHeight) {
                    AjaxPage();
                }
            });


    function AjaxPage(){
        console.log(now);
        $.post('<?php echo url("Usercenter/mypartessay"); ?>',
                {page:now},
                function(data){
                    if(data.code==1) {

                        console.log(data);
                        $html = '';
                        for(c in data.list){

                            if(data.list[c].note !=''){
                               var vc =   "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class='nt1'>"+data.list[c].note+"</span>"
                            }else{
                                var vc =   ""
                            }


                            //data.list[c].addtime
                            $html = $html + "<a href='/index/index/essay_detail/id/"+data.list[c].essay_id+".html' class='weui-media-box weui-media-box_appmsg'><div class='weui-media-box__hd'><img class='weui-media-box__thumb' src='/uploads/images/"+data.list[c].photo+"' height='100%' alt=''></div><div class='weui-media-box__bd'><h4 class='weui-media-box__title'>"+data.list[c].essay_title+"</h4><p class='weui-media-box__desc' >"+data.list[c].article_title+vc+"</p></div></a>";
                        }
                        $("#myarticle").append($html);
                    }
                });

        now++;
    }

    //底部导航



</script>

</html>